home *** CD-ROM | disk | FTP | other *** search
- NLMenu.bas - Show use of NewLook menus using Intuition, GadTools and Locale
- ===========================================================================
-
- Derived from example (c) Copyright 1992 Commodore-Amiga, Inc.
-
- This is a translation of the Commodore RKM example "GadTools Menus Example",
- taken from the Libraries RKM p.372. The example has been enhanced to use the
- Workbench 3 "New-Look" imagery, and includes a substantial amount of code
- to aid in constructing the input array (since BASIC does not support static
- initialisation as per C). All strings used by the program are obtained via
- the current locale (assuming locale.library is present).
-
- The example opens a window on the default public screen (note that a BASIC
- window cannot be used as the WA_NewLookMenus tag is not passed by BASIC for
- its own windows), the ASL font requester is used to obtain a font for
- rendering the menu in (the default is the system default screen text). If a
- custom font is selected BOOPSI images for the Amiga key and check mark are
- created (these will only succeed for WB3.0 and later). The window is then
- opened and messages swallowed until the window is closed.
-
- The include file BLib/GadToolsMenus.bas provides routines for building the
- members of the array passed to the GadTools routines.
-
- The example will work on versions of Workbench 2.0 or later (V36 and above)
-
- Compiling
- ---------
- Load the NLMenu_inc.bh file and Tokenise it (Program-Tokenise), making sure
- you have no token file selected in the File Options (Settings-Compiler-Files).
- Once you have your token file, set the File Options-Token File setting to the
- NLMenu_inc.t file just created. Load the NLMenu.bas file, compile and run it.
-
- In addition a number of files are automatically generated; note that these
- command sequences require CatComp (included in the NDUK 3.1 available from
- Commodore), RX (included as part of ARexx in WB2.0), the BASIC OToTagList
- program (in the HBASIC2:Tools drawer) and the EQUToBC.rexx script (in the
- HBASIC2:Rexx drawer). In addition the PIPE: device must be mounted (if its not
- move it from the SYS:Storage/DOSDrivers drawer to the SYS:DEVS/DOSDrivers
- drawer & reboot to mount it).
-
- The files may then be generated in the following way:
-
- NLMenu_strings.bc (IDs defining strings in a catalog)
- -----------------------------------------------------
- CatComp NLMenu_strings.cd ASMFILE PIPE:0
- RX EQUToBC.rexx <PIPE:0 >NLMenu_strings.bc
-
- NLMenu_strings.bas (Code & Default strings when catalog not present)
- --------------------------------------------------------------------
- CatComp NLMenu_strings.cd OBJFILE NLMenu_strings.o
- OToTaglist NLMenu_strings.o NLMenu_strings.bas
- Delete NLMenu_strings.o
-
- français/NLMenu.catalog (French catalog translation)
- ----------------------------------------------------
- CatComp NLMenu_strings.cd NLMenu_français.ct CATALOG Catalogs/français/NLMenu.catalog
-